<%@page import="org.ddr.member.dao.MemberDAO"%>
<%@page import="java.util.ArrayList"%>
<%@page import="org.ddr.member.MemberVO"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

	

<%
	try{
		
		MemberVO mvo = new MemberVO();
		List<MemberVO> list = new ArrayList<MemberVO>();
		request.setCharacterEncoding("utf-8");
		
		String userId = request.getParameter("id");
		String userPw = request.getParameter("pw");
				
		list = MemberDAO.instance.getUser(userId, userPw);
	
		mvo.setUserid(userId);
		mvo.setPw(userPw);
		
		session.setAttribute("login", list.get(0).getUserid());

// 		Cookie cookie = new Cookie("id", userId);
// 		cookie.setMaxAge(60*30);
// 		response.addCookie(cookie);
				
		response.sendRedirect("boardlist.jsp");
	}catch (Exception e){
		response.sendRedirect("error404.jsp");
	}
	
%>